<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>  </title>
    <style>
        #box{
            width: 200px;
            height: 200px;
            background-color: rgb(255, 191, 122);
        }

        .box1{
            border: 4px solid blue;
            box-shadow: 0 0 20px red;
        }
    </style>
</head>
<body>
    <div id="box"></div>
    <button onclick="setClass()">设置</button>
</body>
<script src="./lib/jquery.min.js"></script>
<script>
    function setClass(){
        $("#box").toggleClass("box1");   /*addClass 添加  toggleClass 切换*/
    }


    function setCss(){
        $("#box").css("background-color","red");
        $("#box").css("width","400px");
    }


</script>
</html>